package com.example.spareparts.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.spareparts.entity.InBoundRecords;
import com.example.spareparts.repository.InBoundRecordsRepository;
import java.util.List;

@Service
public class InBoundRecordsService {
    @Autowired
    private InBoundRecordsRepository inBoundRecordsRepository;
    public List<InBoundRecords> findAllInBoundRecords(){
        return inBoundRecordsRepository.findAllInBoundRecords();
    }
    public void insertInBoundRecord(InBoundRecords inBoundRecord){
        inBoundRecordsRepository.insertInBoundRecord(inBoundRecord);
    }
    public void updateInBoundRecord(InBoundRecords inBoundRecord){
        inBoundRecordsRepository.updateInBoundRecord(inBoundRecord);
    }
    public void deleteInBoundRecord(Long inboundid){
        inBoundRecordsRepository.deleteInBoundRecord(inboundid);
    }
    public InBoundRecords findInBoundRecordById(Long inboundid){
        return inBoundRecordsRepository.findInBoundRecordById(inboundid);
    }
    public List<InBoundRecords> findInBoundRecordBySparePartId(Long sparepartid){
        return inBoundRecordsRepository.findInBoundRecordBySparePartId(sparepartid);
    }
    public InBoundRecords findInBoundRecordByBatchNumber(String batchNumber){
        return inBoundRecordsRepository.findInBoundRecordByBatchNumber(batchNumber);
    }
}
